import axios from '@/libs/api.request'
//优惠券活动列表
export const apiCouponactivityList = data => {
    return axios.request({
      url: '/couponactivity/list',
      method: 'post',
      data
    })
  }

//   /保存
export const apiCouponactivitySave = data => {
    return axios.request({
      url: '/couponactivity/save',
      headers: { 'Content-Type': 'application/json' },
      method: 'post',
      data
    })
  }
// 修改
export const apiCouponactivityUpdate = data => {
    return axios.request({
      url: '/couponactivity/update',
      method: 'post',
      data
    })
  }
// 删除
export const apiCouponactivityDelete = data => {
    return axios.request({
      url: '/couponactivity/delete',
      method: 'post',
      data
    })
  }
//作废
export const apiCouponactivityChangeStatus = data => {
  return axios.request({
    url: '/couponactivity/change-status',
    method: 'post',
    data
  })
}
  // 推广
export const apiCouponactivityPromotion = data => {
  return axios.request({
    url: '/couponactivity/promotion',
    method: 'post',
    data
  })
}

//优惠券活动详情
export const apiCouponactivityInfo = data => {
  return axios.request({
    url: `/couponactivity/info/${data.id}`,
    method: 'post',
    data
  })
}